package com.leruan.aasimp.dao;

import java.util.List;
import java.util.Map;

import com.leruan.aasimp.bean.UsedCarSaleMainBean;
import com.leruan.aasimp.entity.UsedCarSale;

public interface UsedCarSaleDao {

	
	/**
	 * 根据条件得到usedCarSaleList
	 * 
	 * @throws Exception
	 * */
	List<UsedCarSaleMainBean> getUsedCarSaleList(Map<String, Object> map, int pageNo)throws Exception;

	/**
	 * 根据条件得到usedCarSaleBean记录总数
	 * 
	 * @throws Exception
	 * */
	Long getUsedSaleTotal(Map<String, Object> map)throws Exception;

	
	/**
	 * 根据id割到一条出售记录的详细信息
	 * 
	 * @throws Exception
	 * */
	UsedCarSale getSaleInfoById(String id)throws Exception;


	/**
	 * 根据出售信息记录id跟到图片路径集合
	 * 
	 * @throws Exception
	 * */
	List<String> getImagesUrlById(String id)throws Exception;

	/**
	 * 更新updateUsedCarSale
	 * 
	 * @throws Exception
	 * */
	void updateUsedCarSale(UsedCarSale usedCarSale)throws Exception;

	/**
	 * 根据userId获取我发布的二手车出售信息
	 * 
	 * @throws Exception
	 * */
	List<UsedCarSaleMainBean> getUsedCarSaleListById(String userId)throws Exception;

	/**
	 * 根据id、userId删除我发布的二手车出售信息
	 * 
	 * @throws Exception
	 * */
	void deleteMyUsedCarSale(String id, String userId)throws Exception;

	void saveUsedCarSale(UsedCarSale usedCarSale)throws Exception;

	Long findId(UsedCarSale usedCarSale)throws Exception;


	
}
